class Solution {
public:

    string solve(string s, string t) 
    {
        vector<int> A, B;
        for(int i = s.size() - 1; i >= 0; i--) A.push_back(s[i] - '0');
        for(int i = t.size() - 1; i >= 0; i--) B.push_back(t[i] - '0');
        vector<int> ret;
        int tmp = 0;
        int n = max(A.size(), B.size());
        for(int i = 0; i < n; i++)
        {
            if(i < A.size()) tmp += A[i];
            if(i < B.size()) tmp += B[i];
            ret.push_back(tmp % 10);
            tmp /= 10;
        }
        if(tmp) ret.push_back(1);
        string ans;
        for(int i = ret.size() - 1; i >= 0; i--) ans += ret[i] + '0';
        return ans;
    }
};
